<?php
class ShopProduct {
	public $title;
	public $mainName;
	public $firstName;
	public $price;
	
	function __construct($title, $mainName, $firstName, $price) {
		$this->title = $title;
		$this->mainName = $mainName;
		$this->firstName = $firstName;
		$this->price = $price;
	}
	
	function getProducer() {
		return "{$this->firstName} {$this->mainName}\n";
	}
}

class Wrong {
	
}

class ShopProductWriter {
	function write(ShopProduct $shopProduct) {
		$str = "{$shopProduct->title}: " . $shopProduct->getProducer() . "({$shopProduct->price})";
		print($str);
	}
}

$product1 = new ShopProduct('titleName', 'Shengbo', 'Tan', 12.5);
$writer = new ShopProductWriter();
$wrong = new Wrong();
$writer->write($wrong);